% REIT growth rate statistics
%--------------------------------------------------------------------------

% Set path to growth rate data.
cd('C:\work_temp\Evidence_from_real_estate_funds\growth_rates');

%%% Germany

DE_growth_rates = readtable('DE.csv', 'ReadVariableNames', true);

commercial = ["Deutsche_Konsum_REIT_AG", "Deutsche_Industrie_REIT_AG", "Alstria_Office_REIT_AG", "Hamborner_REIT_AG"];

all_rates_comm = [];
for iFund = 1:size(commercial,2)
    
    all_rates_comm = [all_rates_comm;DE_growth_rates.(commercial(iFund))];
    
end

DE_mean_comm = mean(all_rates_comm)
DE_median_comm = median(all_rates_comm)

DE_min_comm = min(all_rates_comm)
DE_max_comm = max(all_rates_comm)

residential = ["Deutsche_Wohnen_SE", "LEG_Immobilien_AG", "Vonovia_SE", "TAG_Immobilien_AG", "Grand_City_Properties_SA"];

all_rates_res = [];
for iFund = 1:size(residential,2)
    
    all_rates_res = [all_rates_res;DE_growth_rates.(residential(iFund))];
    
end

DE_mean_res = mean(all_rates_res)
DE_median_res = median(all_rates_res)

DE_min_res = min(all_rates_res)
DE_max__res = max(all_rates_res)

[h,p] = ttest2(all_rates_res, all_rates_comm)


%%% France

FR_growth_rates = readtable('FR.csv', 'ReadVariableNames', true);

commercial = ["Frey_SIIC", "Gecina_SIIC", "ICADE_SIIC", "Mercialys_SIIC", "PAREF_Paris_Realty_Fund_SIIC", "Societe_De_La_Tour_Eiffel_SIIC", ...
    "Acanthe_Developpement_SIIC", "MRM_SIIC"];

all_rates_comm = [];
for iFund = 1:size(commercial,2)
    
    all_rates_comm = [all_rates_comm;FR_growth_rates.(commercial(iFund))];
    
end

FR_mean_comm = mean(all_rates_comm)
FR_median_comm = median(all_rates_comm)

FR_min_comm = min(all_rates_comm)
FR_max_comm = max(all_rates_comm)

residential = ["Nexity_SA", "Altarea_Group_SCA"];

all_rates_res = [];
for iFund = 1:size(residential,2)
    
    all_rates_res = [all_rates_res;FR_growth_rates.(residential(iFund))];
    
end

FR_mean_res = mean(all_rates_res)
FR_median_res = median(all_rates_res)

FR_min_res = min(all_rates_res)
FR_max__res = max(all_rates_res)

[h,p] = ttest2(all_rates_res, all_rates_comm)


%%% Italy

IT_growth_rates = readtable('IT.csv', 'ReadVariableNames', true);

commercial = ["Immobiliare_Grande_Distribuzione_S_SIIQ", "AEDES_SIIQ", "Brioschi_Sviluppo_Immobiliare_SpA", ...
    "Coima_RES_SpA_SIIQ", "Risanamento_SpA", "Restart_SpA_SIIQ"];

all_rates_comm = [];
for iFund = 1:size(commercial,2)
    
    all_rates_comm = [all_rates_comm;IT_growth_rates.(commercial(iFund))];
    
end

IT_mean_comm = mean(all_rates_comm)
IT_median_comm = median(all_rates_comm)

IT_min_comm = min(all_rates_comm)
IT_max_comm = max(all_rates_comm)

residential = ["Nova_Re_SpA_SIIQ"];

all_rates_res = [];
for iFund = 1:size(residential,2)
    
    all_rates_res = [all_rates_res;IT_growth_rates.(residential(iFund))];
    
end

IT_mean_res = mean(all_rates_res)
IT_median_res = median(all_rates_res)

IT_min_res = min(all_rates_res)
IT_max__res = max(all_rates_res)

[h,p] = ttest2(all_rates_res, all_rates_comm)


%%% Spain

ES_growth_rates = readtable('SP.csv', 'ReadVariableNames', true);

commercial = ["Merlin_Properties_SOCIMI_SA", "Vitruvio_Real_Estate_SOCIMI_SA", "Inmobiliara_Colonial_SOCIMI_SA", ...
    "Lar_Espana_Real_Estate_SOCIMI_SA", "Olimpo_Real_Estate_SOCIMI_SA"];

all_rates_comm = [];
for iFund = 1:size(commercial,2)
    
    all_rates_comm = [all_rates_comm;ES_growth_rates.(commercial(iFund))];
    
end

ES_mean_comm = mean(all_rates_comm)
ES_median_comm = median(all_rates_comm)

ES_min_comm = min(all_rates_comm)
ES_max_comm = max(all_rates_comm)

residential = ["Quabit_Inmobiliara_SA", "Renta_Corporacion_Real_Estate_SA"];

all_rates_res = [];
for iFund = 1:size(residential,2)
    
    all_rates_res = [all_rates_res;ES_growth_rates.(residential(iFund))];
    
end

ES_mean_res = mean(all_rates_res)
ES_median_res = median(all_rates_res)

ES_min_res = min(all_rates_res)
ES_max__res = max(all_rates_res)

[h,p] = ttest2(all_rates_res, all_rates_comm)


%%% UK

UK_growth_rates = readtable('UK.csv', 'ReadVariableNames', true);

commercial = ["Land_Securities_Group_REIT_PLC", "British_Land_REIT_PLC", "Derwent_London_REIT_PLC", ...
    "Tritax_Big_Box_REIT_PLC", "Workspace_Group_REIT_PLC"];

all_rates_comm = [];
for iFund = 1:size(commercial,2)
    
    all_rates_comm = [all_rates_comm;UK_growth_rates.(commercial(iFund))];
    
end

UK_mean_comm = mean(all_rates_comm)
UK_median_comm = median(all_rates_comm)

UK_min_comm = min(all_rates_comm)
UK_max_comm = max(all_rates_comm)

residential = ["KCR_Residential_REIT_PLC", "Empiric_Student_Property_REIT_PLC", "Residential_Secure_Income_REIT_PLC", ...
    "The_PRS_REIT_PLC"];

all_rates_res = [];
for iFund = 1:size(residential,2)
    
    all_rates_res = [all_rates_res;UK_growth_rates.(residential(iFund))];
    
end

UK_mean_res = mean(all_rates_res)
UK_median_res = median(all_rates_res)

UK_min_res = min(all_rates_res)
UK_max__res = max(all_rates_res)

[h,p] = ttest2(all_rates_res, all_rates_comm)


%%% US

US_growth_rates = readtable('US.csv', 'ReadVariableNames', true);

commercial = ["Alexandria_Real_Estate_Equities_Inc_REIT", "Brandywine_Realty_Trust_REIT", "CBL_Properties_REIT", ...
    "Duke_Realty_Corporation_REIT"];

all_rates_comm = [];
for iFund = 1:size(commercial,2)
    
    all_rates_comm = [all_rates_comm;US_growth_rates.(commercial(iFund))];
    
end

US_mean_comm = mean(all_rates_comm)
US_median_comm = median(all_rates_comm)

US_min_comm = min(all_rates_comm)
US_max_comm = max(all_rates_comm)

residential = ["AvalonBay_Communities_Inc_REIT", "Essex_Property_Trust_Inc_REIT", "Mid_America_Appartement_Communities_REIT", ...
    "Invitation_Home_Inc_REIT", "UDR_Inc_REIT"];

all_rates_res = [];
for iFund = 1:size(residential,2)
    
    all_rates_res = [all_rates_res;US_growth_rates.(residential(iFund))];
    
end

US_mean_res = mean(all_rates_res)
US_median_res = median(all_rates_res)

US_min_res = min(all_rates_res)
US_max__res = max(all_rates_res)

[h,p] = ttest2(all_rates_res, all_rates_comm)


%%% Switzerland

CH_growth_rates = readtable('CH.csv', 'ReadVariableNames', true);

commercial = ["Intershop_Holding_AG", "PSP_Swiss_Property_AG", "Swiss_Prime_Site_AG", ...
    "UBS_Swissreal", "Swisscanto_CH_Real_Estate_Fund_Swiss_Commercial_FA_CHF", "UBS_CH_PF_Swiss_Mixed_Sima_Ord"];

all_rates_comm = [];
for iFund = 1:size(commercial,2)
    
    all_rates_comm = [all_rates_comm;CH_growth_rates.(commercial(iFund))];
    
end

CH_mean_comm = mean(all_rates_comm)
CH_median_comm = median(all_rates_comm)

CH_min_comm = min(all_rates_comm)
CH_max_comm = max(all_rates_comm)

residential = ["Swisscanto_CH_Real_Estate_Funds_IFCA_FA_CHF", "IMMOFONDS", "UBS_Anfos", ...
    "Credit_Suisse_Real_Estate_Fund_Siat", "UBS_Direct_Residential"];

all_rates_res = [];
for iFund = 1:size(residential,2)
    
    all_rates_res = [all_rates_res;CH_growth_rates.(residential(iFund))];
    
end

CH_mean_res = mean(all_rates_res)
CH_median_res = median(all_rates_res)

CH_min_res = min(all_rates_res)
CH_max__res = max(all_rates_res)

[h,p] = ttest2(all_rates_res, all_rates_comm)